<template>
  <div class="header">
    <div class="page-title">余额变动</div>
    <el-table :data="tableData" class="m-t-5">
      <el-table-column type="selection" width="55"></el-table-column>
      <el-table-column prop="id" label="id" width="100"></el-table-column>
      <el-table-column
        prop="wxname"
        label="微信名"
        width="150"
      ></el-table-column>
      <el-table-column label="头像" width="200" class="t-c">
        <template #default="v">
          <el-image :src="v.row.wximage" fit="cover"></el-image>
          <img src="D:\JannLee\car\files\design.png"/>
        </template>
      </el-table-column>

      <el-table-column prop="event_type" label="类型" ></el-table-column>
      <el-table-column prop="price" label="金额" ></el-table-column>
      <el-table-column prop="create_time" label="操作时间" ></el-table-column>
    </el-table>
    <el-pagination
      background
      hide-on-single-page
      layout="prev, pager, next"
      :total="total"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
      :current-page="current"
      @current-change="changePage"
    >
    </el-pagination>
  </div>
</template>
<script>

import { request_balance_list} from "@/util/api";

export default {
  name: "SeekType",
  data() {
    return {
      current: 1,
      total: 0,
      form: {},
      // 门店是否显示
      dialogFormVisible: false,
    };
  },
  computed: {},
  mounted() {
    this.init();
  },
  methods: {
    init() {
        this.changePage(1)
    },
    // 分页
    changePage(page) {
      request_balance_list({
        page,
      })
        .then((res) => {
          const result = res.data;
          if (result.code == 200) {
            this.tableData = result.data.data;
            this.total     = result.data.total;
            this.current   = result.data.current;
          }
        })
        .catch();
    },
  },
};
</script>

<style scoped  lang="less">
  .avatar-uploader {
    float:left;
    margin-right:10px;
    margin-bottom:10px;
   }
   .banner-add {
      clear:both;
      margin-top:20px;
   }
</style>